<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>订单详情</title>
    <#include "/header.html">
</head>
<body>

<!--页面包含商品明细列表  订单商品外协供应商明细列表  订单备注 订单附言-->
<div id="twbOrderDetailApp" v-cloak>
    <!-- 操作 start -->
    <div class="panel-default" style="display: block;margin-bottom: 10px;" align="center">
        <!-- 审核 -->
        <div style="padding: 5px 0;" class="container">
                  <el-col :span="6" :offset="6">
                    <el-button type="primary" plain size="small" icon="el-icon-back"  @click="reload">返回</el-button>
                  </el-col>
        </div>
    </div>
    <!-- 操作 end -->
    <!-- 订单信息 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>订单编号：&nbsp;&nbsp;{{erpOrder.orderNo}}</span>
            </div>
            <div class="text item">
                <div class="row" style="line-height:30px;font-size: 12px;">
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-4 text-right">会员名 ：</div>
                            <div class="col-md-8">{{erpOrder.memberName}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">联系人 ：</div>
                            <div class="col-md-8">{{erpOrder.shipName}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">生产状态 ：</div>
                            <div class="col-md-8">{{erpOrder.productionStatus}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">项目名称 ：</div>
                            <div class="col-md-8">{{erpOrder.projectName}}</div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-4 text-right">发货状态 ：</div>
                            <div class="col-md-8">{{erpOrder.shipStatus}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">付款状态 ：</div>
                            <div class="col-md-8" >{{erpOrder.payStatus}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">付款方式 ：</div>
                            <div class="col-md-8">{{erpOrder.payment}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">订单附言 ：</div>
                            <div class="col-md-8">{{erpOrder.memo}}</div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-4 text-right">商品总额 ：</div>
                            <div class="col-md-8">{{erpOrder.totalAmount}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">优惠金额 ：</div>
                            <div class="col-md-8">
                             <span > {{erpOrder.pmtGoods}}</span>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">应付金额 ：</div>
                            <div class="col-md-8">{{erpOrder.payableAmount}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">已付金额 ：</div>
                            <div class="col-md-8">{{erpOrder.payed}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">押金金额 ：</div>
                            <div class="col-md-8">{{erpOrder.depositMoney}}</div>
                        </div>
                    </div>
                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-md-4 text-right">收货人 ：</div>
                            <div class="col-md-8">{{erpOrder.shipName}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">联系方式 ：</div>
                            <div class="col-md-8">{{erpOrder.shipMobile}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">收货地区 ：</div>
                            <div class="col-md-8">{{erpOrder.shipArea}}</div>
                        </div>
                        <div class="row">
                            <div class="col-md-4 text-right">收货地址 ：</div>
                            <div class="col-md-8">{{erpOrder.shipAddr}}</div>
                        </div>
                    </div>
                </div>
            </div>
        </el-card>
    </el-row>
    <!-- 订单信息 end -->

    <!-- 商品明细列表 start -->
     <el-row>
          <el-card class="box-card">
              <div slot="header" class="clearfix">
                  <span>商品信息</span>
                 <!-- <el-button  type="primary" plain size="small" icon="el-icon-edit" style="float: right"  v-show="startItemEdit==false" @click="startItemEdit=true">修改</el-button>
                  <el-button  type="primary" plain size="small" icon="el-icon-check" style="float: right" v-show="startItemEdit==true"  @click="save">保存</el-button>-->
              </div>

              <el-table
                      :data="orderItemDetailData"
                      border
                      max-height="250"
                      style="width: 100%"
                      size="small"
                      >
                <el-table-column type="index" label="序号"></el-table-column>
                  <el-table-column
                          prop="productId"
                          label="商品ID"
                          width="80">
                  </el-table-column>
                <el-table-column
                        prop="name"
                        label="商品名称"
                        >
                </el-table-column>

                <el-table-column
                        prop="addon"
                        label="规格/尺寸/材质/工艺">
                </el-table-column>

                  <el-table-column
                          prop="unit"
                          label="单位"
                          width="70">
                  </el-table-column>

                  <el-table-column
                          prop="nums"
                          label="数量"
                          >
                  </el-table-column>

                  <el-table-column
                          prop="copy"
                          label="份数"
                          >
                  </el-table-column>

                  <el-table-column
                          prop="price"
                          label="单价"

                  >
                  </el-table-column>

                  <el-table-column
                          prop="nums"
                          label="数量"
                          >
                  </el-table-column>

                  <el-table-column
                          prop="pmtGoods"
                          label="优惠"
                          >
                  </el-table-column>

                <el-table-column
                        prop="amount"
                        label="总价"
                        >
                   <!-- <template slot-scope="scope" >
                        <span v-show="!startItemEdit">{{scope.row.amount}}</span>
                        <span v-show="startItemEdit"><el-input-number v-model="scope.row.amount" controls-position="right"  size="small" @change="changeItemPrice(scope.row)" :min="0"></el-input-number></span>
                    </template>-->
                </el-table-column>

                  <el-table-column
                          prop="itemRemark"
                          label="备注">
                  </el-table-column>

                  <el-table-column
                          fixed="right"
                          label="操作"
                          width="250">
                      <template slot-scope="scope">
                          <el-button @click="suppFormShow(scope.row)" type="text" size="small" >添加供应商</el-button>
                      </template>
                  </el-table-column>
            </el-table>
        </el-card>
    </el-row>
    <!-- 商品明细列表 end -->

    <!-- 商品分配列表 start -->
    <el-row>
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>商品分配列表</span>
            </div>
            <div class="text item">
                <el-table border stripe ref="multipleTable" :data="erpOrderProductionList"
                          tooltip-effect="dark" size="small">
                    <el-table-column type="index" label="序号"></el-table-column>
                    <el-table-column prop="erpItemName" label="商品名称"></el-table-column>
                    <el-table-column prop="attributeName" label="工艺"></el-table-column>
                    <el-table-column prop="producerName" label="供应商"></el-table-column>
                    <el-table-column prop="cost" label="外协金额"></el-table-column>
                    <el-table-column prop="csRemark" label="备注"></el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button type="text" @click="delAllotItem(scope.row)" size="small">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </div>
        </el-card>
    </el-row>
    <!-- 商品分配列表 end -->
</div>
<#include "/modules/order/twdAddSupplier.html">
<script src="${request.contextPath}/statics/js/modules/order/twbOrderDetail.js?_${.now?long}"></script>
</body>
</html>